import request from '@/utils/request'


export function list(query) {
  return request({
    url: '/admin/cash/list',
    method: 'get',
    params: query
  })
}
export function agentListHis(query) {
  return request({
    url: '/agent/cash/listHis',
    method: 'get',
    params: query
  })
}

export function listHis(query) {
  return request({
    url: '/admin/cash/listHis',
    method: 'get',
    params: query
  })
}


// 删除操作日志
export function updateCash(id,earning) {
  const data = {
    id,
    earning
  }

  return request({
    url: '/admin/cash/update'  ,
    method: 'post',
    data: data
  })
}

export function cancel(id) {
  return request({
    url: '/admin/money/cancel?id=' + id,
    method: 'get'
  })
}

 
export function updateUserCash(data) {
 

  return request({
    url: '/admin/cash/update'  ,
    method: 'post',
    data: data
  })
}
